<script>
    $("#bodyView").addClass("news_background");
    $("#bodyView").removeClass("background");
    $("#bodyView").removeClass("achievement_background");
    $("#bodyView").removeClass("edituser_background");
</script>
<link rel="stylesheet" href="lib/commentBox/css/smohan.face.css">
<script type="text/javascript" src="lib/commentBox/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="lib/commentBox/js/smohan.face.js"></script>

<article class="container-fluid" style="margin-top: 400px; background-color: rgba(253, 250, 197, 1);">
    <div class="row">
        <h1 class="text-center"><b>{{news.news_title}}</b></h1>
        <h2 class="text-center" style="font-size: 10px;">发表时间:&nbsp;&nbsp;{{news.news_publish_time}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发布者:&nbsp;&nbsp;{{news.publisher}}</h2>
        <p id="news_content" class="col-md-offset-2 col-md-8"></p>
    </div>
    <!--<div class="row col-md-offset-2 col-md-8 text-center">-->
        <!--<a style="font-size: 25px;" href="#top" ng-click="goToTop()">返回顶部</a>-->
    <!--</div>-->
    <div class="row">
        <div class="col-md-offset-2 col-md-8">
            <button class="btn btn-link" style="font-size: 25px;" ng-click="preNews()">上一篇</button>
            <button class="btn btn-link col-md-offset-4" style="font-size: 25px;" ng-click="back()">返回首页</button>
            <button class="btn btn-link" style="font-size: 25px;float:right;" ng-click="nextNews()">下一篇</button>
        </div>
    </div>
    <div class="row">
        <!--表情盒子-->
        <div  class="col-md-offset-2 col-md-8">
            <div id="Smohan_FaceBox" ng-if="user.role!=0">
                <textarea name="text" placeholder="来说两句吧!~" id="Smohan_text" class="smohan_text" maxlength="80" ng-model="comment" style="width: 100%"></textarea>
                <p>
                    <a href="javascript:void(0)" class="face" title="表情"></a>
                    <button class="button" id="Smohan_Showface" ng-click="publishComment()">发表评论</button>
                </p>
            </div>
            <div ng-if="user.role==0" class="alert alert-info text-center" role="alert" ng-if="totalNum==0&&user.role==2">游客是不能发表评论的哟~</div>
        </div>
        <!--/表情盒子-->
        <div class="row">
            <div class="col-md-offset-2 col-md-8">
                <h2><b>评论</b></h2>
                <hr>
            </div>
        </div>
        <div class="row">
            <div class="col-md-offset-2 col-md-8">
                <div class="media" ng-repeat="comment in news.comments">
                    <div class="media-left">
                        <a href="#">
                            <img style="width: 80px;height:80px;" class="media-object img-thumbnail" src="{{comment.headimage}}" alt="headimage">
                        </a>
                    </div>
                    <div class="media-body">
                        <h4 class="media-heading"><b>{{comment.comment_publisher_nickname}}</b>&nbsp;&nbsp;<span style="font-size: 10px;">发表于:{{comment.comment_publish_time}}</span><a href="javascript:void(0)" style="left: 30px;display: inline-block;position: relative;" ng-if="user.role==3||comment.user_id==user.user_id" ng-click="deleteComment(comment.comment_id,$index)">删除</a></h4>
                        <div class="Zones" ng-bind-html="comment.comment_content"></div>
                    </div>
                </div>
            </div>
        </div>
        <!--/DEMO-->
    </div>
</article>

<script type="text/javascript">
    $(function (){
        $("a.face").smohanfacebox({
            Event : "click",	//触发事件
            divid : "Smohan_FaceBox", //外层DIV ID
            textid : "Smohan_text" //文本框 ID
        });
    });


</script>